package vip.xiaonuo.supplier.modular.base.productions.entity;

import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.annotation.*;
import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import vip.xiaonuo.common.pojo.CommonEntity;
import vip.xiaonuo.supplier.modular.base.brands.entity.SupplierBrands;
import vip.xiaonuo.supplier.modular.base.categories.entity.SupplierCategories;
import vip.xiaonuo.supplier.modular.base.units.entity.SupplierUnits;
import vip.xiaonuo.supplier.modular.custom.objects.entity.SupplierObjects;
import vip.xiaonuo.supplier.modular.purchase.suppliers.entity.SupplierSuppliers;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 商品信息实体
 *
 * @author Mr.wu
 * @date  2025/03/15 10:46
 **/
@Getter
@Setter
@TableName("SUPPLIER_PRODUCTIONS")
public class SupplierProductions extends CommonEntity {

    /** 商品ID */
    @TableId
    @Schema(description = "商品ID")
    private String id;

    /** 商品编码 */
    @Schema(description = "商品编码")
    private String productionCode;

    /** 主条码 */
    @Schema(description = "主条码")
    private String productionBarcode;

    /** 商品名称 */
    @Schema(description = "商品名称")
    private String productionName;

    /** 拼音码 */
    @Schema(description = "拼音码")
    private String productionPinyincode;

    /** 商品标题 */
    @Schema(description = "商品标题")
    private String productionTitle;

    /** 品牌 */
    @Schema(description = "品牌")
    @Trans(type = TransType.SIMPLE, target = SupplierBrands.class, fields = "brandName", alias = "brands", ref = "productionBrandName")
    private String productionBrand;

     /**品牌名称 */
    @Schema(description = "品牌名称")
    @TableField(exist = false)
    private String productionBrandName;

    /** 商品图片 */
    @Schema(description = "商品图片")
    private String productionImages;

    /** 商品分类 */
    @Schema(description = "商品分类")
    @Trans(type = TransType.SIMPLE, target = SupplierCategories.class, fields = "categoriesName", alias = "categories", ref = "productionCategoriesIdName")
    private String productionCategoriesId;

    /**商品分类名称 */
    @Schema(description = "商品分类名称")
    @TableField(exist = false)
    private String productionCategoriesIdName;

    /** 规格 */
    @Schema(description = "规格")
    private String productionSpec;

    /** 产地 */
    @Schema(description = "产地")
    private String productionOrigin;

    /** 单位 */
    @Schema(description = "单位")
    @Trans(type = TransType.SIMPLE, target = SupplierUnits.class, fields = "unitName", alias = "units", ref = "productionUnitName")
    private String productionUnit;

     /**单位名称 */
    @Schema(description = "单位名称")
    @TableField(exist = false)
    private String productionUnitName;

    /** 辅助单位 */
    @Schema(description = "辅助单位")
    @Trans(type = TransType.SIMPLE, target = SupplierUnits.class, fields = "unitName", alias = "units", ref = "productionUnitAuxiliaryName")
    private String productionUnitAuxiliary;

     /**辅助单位名称 */
    @Schema(description = "辅助单位名称")
    @TableField(exist = false)
    private String productionUnitAuxiliaryName;

    /** 采购单价 */
    @Schema(description = "采购单价")
    private BigDecimal productionPriceProcure;

    /** 最近采购单价 */
    @Schema(description = "最近采购单价")
    private BigDecimal productionPriceProcureLast;

    /** 销售单价 */
    @Schema(description = "销售单价")
    private BigDecimal productionPriceSale;

    /** 批发单价 */
    @Schema(description = "批发单价")
    private BigDecimal productionPriceWhole;

    /** 最低销售单价 */
    @Schema(description = "最低销售单价")
    private BigDecimal productionPriceLimit;

    /** 零售价 */
    @Schema(description = "零售价")
    private BigDecimal productionPriceRetail;

    /** 是否启用客户等级价格 */
    @Schema(description = "是否启用客户等级价格")
    @Trans(type = TransType.DICTIONARY, key = "COMMON_SWITCH")
    private String productionPriceCustomTypeSwitch;

    /** 客户等级价格 */
    @Schema(description = "客户等级价格")
    private String productionPriceCustomType;

    /** 是否线上销售 */
    @Schema(description = "是否线上销售")
    @Trans(type = TransType.DICTIONARY, key = "COMMON_SWITCH")
    private String productionOnlineSwitch;

    /** 是否计库存 */
    @Schema(description = "是否计库存")
    @Trans(type = TransType.DICTIONARY, key = "COMMON_SWITCH")
    private String productionIsstock;

    /** 库存 */
    @Schema(description = "库存")
    private BigDecimal productionStock;

    /** 库存上限 */
    @Schema(description = "库存上限")
    private BigDecimal productionStockUp;

    /** 库存下限 */
    @Schema(description = "库存下限")
    private BigDecimal productionStockLow;

    /** 保质期 */
    @Schema(description = "保质期")
    private Integer productionExp;

    /** 主供应商 */
    @Schema(description = "主供应商")
    @TableField(updateStrategy = FieldStrategy.ALWAYS)
    @Trans(type = TransType.SIMPLE, target = SupplierObjects.class, fields = "objectName", alias = "objects", ref = "productionSupplierMainName")
    private String productionSupplierMain;

     /**主供应商名称 */
    @Schema(description = "主供应商名称")
    @TableField(exist = false)
    private String productionSupplierMainName;

    /** 供应商列表 */
    @Schema(description = "供应商列表")
    @TableField(updateStrategy = FieldStrategy.ALWAYS)
    @Trans(type = TransType.SIMPLE, target = SupplierObjects.class, fields = "objectName", alias = "objects", ref = "productionSupplierListName")
    private String productionSupplierList;

     /**供应商列表名称 */
    @Schema(description = "供应商列表名称")
    @TableField(exist = false)
    private String productionSupplierListName;

    /** 商品标签 */
    @Schema(description = "商品标签")
    @TableField(updateStrategy = FieldStrategy.ALWAYS)
    private String productionTag;

    /** 商品描述 */
    @Schema(description = "商品描述")
    @TableField(updateStrategy = FieldStrategy.ALWAYS)
    private String productionDescribe;

    /** 商品状态 */
    @Schema(description = "商品状态")
    private String productionStatus;

    /** 一品多码 */
    @Schema(description = "一品多码")
    private String productionHasextbarcode;

    /** 排序码 */
    @Schema(description = "排序码")
    private Integer sortCode;

    /** 扩展信息 */
    @Schema(description = "扩展信息")
    private String extJson;

    /**库位IDs */
    @Schema(description = "库位IDS")
    @TableField(exist = false)
    private List<String> productionLocationIds;

    /**库位名称 */
    @Schema(description = "库位名称")
    @TableField(exist = false)
    private List<String> productionLocationNames;

    /** 数据归属 */
    @Schema(description = "数据归属")
    private String companyId;
}
